/*
 * StateMachineHead.cpp
 *
 *  Created on: May 1, 2013
 *      Author: dsweeney
 */

#ifndef STATEMACHINEHEAD_CPP_
#define STATEMACHINEHEAD_CPP_

#include "CommonTypesLib.h"

#include <string>
#include <map>
#include <vector>

class StateMachineHead
{
private:
	std::map <std::string, CommonLibTypes::functPtr_t> states;
	CommonLibTypes::functPtr_t defaultMessages;
public:
	StateMachineHead();
	virtual ~StateMachineHead();
	void addState (const std::string& key, CommonLibTypes::functPtr_t ptrToState);
	void addDefaultMessageHandler(const std::string& key, CommonLibTypes::functPtr_t ptrToFunc);
	bool stateChange(const std::string& key, const CommonLibTypes::messageHeader_t& message);

};



#endif /* STATEMACHINEHEAD_CPP_ */
